|
|
|
BlueCielo Meridian Enterprise 2012 Developer's Guide | BlueCielo ECM Solutions |
Both of the email task extension sample projects perform the same functions, just using different services to deliver the notification messages. Each can be used to initiate a custom task from either VBScript or a user interface extension and pass message address, subject, and body text data programmatically to the Task Server. To use one of the extensions, create and submit a new Task object in VBScript event or user interface extension event code. Following is example VBScript code:
Dim objTask
Set objTask = Vault.Task
'Clean up all previouse data before submitting a new task
objTask.Reset
'Set predefined parameters
objTask.Set "From", <senderemailaddress>
objTask.Set "To", <recipientemailaddress>
objTask.Set "CC", <CCemailaddresses>
objTask.Set "BCC", <BCCemailaddresses>
objTask.Set "Subject", <subject>
objTask.Set "BodyText", <bodytext>
'Submit task with ProgID to be executed in context of current document
objTask.Submit "AMEmail2.AMCDOSYS", Document
Replace the placeholders above with your own values calculated to meet your own requirements. Use email addresses retrieved from the Meridian Enterprise user information and subject and body information retrieved from the current document’s workflow status, custom properties, or other data.
When the Task Server receives the Task object, it identifies the task as designated for the AMEmail2 task extension and passes the object to the extension for processing. The AMEmail2 task extension receives the Task object and calls the AMCDOSYS class procedures to set the values of the various message parameters that were set by the script.
The task’s Execute procedure then creates a new CDO object, sets the messaging method, and creates a new Message object. The procedure sets the parameters of the message object with the values that the task extension received, and sends the message.
For further details on how the email task extensions work, refer to the source code provided.
Copyright © 2000-2012 BlueCielo ECM Solutions |